<?php
	function custom_excerpt_length( $length ) {
		return 20;
	}
	add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
	
	function new_excerpt_more( $more ) {
		
		return '...<p><span class="btn btn-small">Leer m&aacute;s</span></p>';
		
//		return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">Read More</a>';
	}
	add_filter( 'excerpt_more', 'new_excerpt_more' );
	
	

/**
 * Register our sidebars and widgetized areas.
 *
 */
if ( function_exists('register_sidebar') ){
    register_sidebar(array(
        'name' => 'my_mega_menu',
        'before_widget' => '<div id="my-mega-menu-widget">',
        'after_widget' => '</div>',
        'before_title' => '',
        'after_title' => '',
));
}

/**
 * Modifica la pagina de usuarios
 *
 */

function modify_user_contact_methods( $user_contact ) {

	/* Add user contact methods */
//	$user_contact['skype'] = __( 'Skype Username' ); 
//	$user_contact['twitter'] = __( 'Twitter Username' ); 

	/* Remove user contact methods */
	unset( $user_contact['aim'] );
	unset( $user_contact['jabber'] );
	unset( $user_contact['yim'] );

	return $user_contact;
}
add_filter( 'user_contactmethods', 'modify_user_contact_methods' );




// removes the `profile.php` admin color scheme options
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );

if ( ! function_exists( 'cor_remove_personal_options' ) ) {
  /**
   * Removes the leftover 'Visual Editor', 'Keyboard Shortcuts' and 'Toolbar' options.
   */
  function cor_remove_personal_options( $subject ) {
    $subject = preg_replace( '#<h3>Personal Options</h3>.+?/table>#s', '', $subject, 1 );
    return $subject;
  }

  function cor_profile_subject_start() {
    ob_start( 'cor_remove_personal_options' );
  }

  function cor_profile_subject_end() {
    ob_end_flush();
  }
}
add_action( 'admin_head-user-edit.php', 'cor_profile_subject_start' );
add_action( 'admin_footer-user-edit.php', 'cor_profile_subject_end' );
?>